$OpenBSD: patch-term_c,v 1.3 2017/04/15 14:11:36 naddy Exp $
--- term.c.orig	Wed Jun 29 23:40:27 2005
+++ term.c	Fri Apr 14 23:16:01 2017
@@ -25,7 +25,7 @@
 #include "regexp.h"
 #include "nn_term.h"
 
-#if !defined(__FreeBSD__) && !(__NetBSD__) && !defined(NeXT)
+#if !defined(__FreeBSD__) && !(__NetBSD__) && !(__OpenBSD__) && !defined(NeXT)
 #include <stropts.h>
 #else
 #include <sys/ioctl.h>
@@ -74,9 +74,9 @@ extern int      s_resized;
 
 #else
 
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
 #include <sgtty.h>
-#endif				/* __FreeBSD__ */
+#endif
 
 #endif
 
@@ -171,8 +171,8 @@ extern char    *tgoto();	/* some systems don't have th
 #else
 
 char           *tgoto();
-char            PC;
-char           *BC, *UP;
+extern char     PC;
+extern char    *BC, *UP;
 char            nnspeed;
 
 static char     XBC[64], XUP[64];
